package club.cearnach.web.controller;

import club.cearnach.web.controller.admin.BackgroundHomeController;
import club.cearnach.web.controller.movie.MovieController;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;

/**
 * 默认路由转发
 *
 * @author 阮胜
 * @date 2018/3/29 11:18
 */
@Api(tags = "基础控制类")
@Controller
public class RedirectController {


    @ApiOperation("跳转到电影首页")
    @GetMapping("/")
    public String index() {
        return "redirect:".concat(MovieController.MOVIE_INDEX);
    }

    @ApiOperation("跳转到电影首页")
    @GetMapping("/movie")
    public String movie() {
        return "redirect:".concat(MovieController.MOVIE_INDEX);
    }

    @ApiOperation("跳转到后台管理员管理首页")
    @GetMapping("/admin")
    public String admin() {
        return "redirect:".concat(BackgroundHomeController.ADMIN_INDEX);
    }

    @ApiOperation("跳转到登录页面")
    @GetMapping("/admin/login/index")
    public void adminIndex() {
    }

    @ApiOperation("Api文档")
    @GetMapping("/api/index")
    public void apiIndex() {
    }
}